]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
a11y: check states EXPANDABLE/EXPANDED on PopupSubMenuMenuItem
authorAlejandro Piñeiro <apinheiro@igalia.com>
Fri, 13 Sep 2013 23:29:21 +0000 (01:29 +0200)
committerAlejandro Piñeiro <apinheiro@igalia.com>
Mon, 16 Sep 2013 10:36:16 +0000 (12:36 +0200)
https://bugzilla.gnome.org/show_bug.cgi?id=708038

js/ui/popupMenu.js

index adff1c6a15fe3b6d4593c9b6b5e98083a98d03f1..3e57562d18a18bc56eff895f32b3a077f5496780 100644 (file)
@@ -969,6 +969,7 @@ const PopupSubMenuMenuItem = new Lang.Class({
             this._triangleBin.set_scale(-1.0, 1.0);
 
         this.actor.add_child(this._triangleBin);
+        this.actor.add_accessible_state (Atk.StateType.EXPANDABLE);
 
         this.menu = new PopupSubMenu(this.actor, this._triangle);
         this.menu.connect('open-state-changed', Lang.bind(this, this._subMenuOpenStateChanged));
@@ -990,9 +991,11 @@ const PopupSubMenuMenuItem = new Lang.Class({
         if (open) {
             this.actor.add_style_pseudo_class('open');
             this._getTopMenu()._setOpenedSubMenu(this.menu);
+            this.actor.add_accessible_state (Atk.StateType.EXPANDED);
         } else {
             this.actor.remove_style_pseudo_class('open');
             this._getTopMenu()._setOpenedSubMenu(null);
+            this.actor.remove_accessible_state (Atk.StateType.EXPANDED);
         }
     },